import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { render } from '/@/utils/common/renderUtils';

//列表数据
export const columns: BasicColumn[] = [
  {
    title: '订单号',
    align: "center",
    dataIndex: 'code',
    width: 270
  },
  {
    title: '订单状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '分配状态',
    align: "center",
    dataIndex: 'dispense_dictText'
  },
  {
    title: '是否拆分订单',
    align: "center",
    dataIndex: 'isapart',
    customRender: ({ text }) => {
      if (text === '1' || text === 1) return '是';
      if (text === '0' || text === 0) return '否';
      return text || '';
    }
  },
  {
    title: '价格参数',
    align: "center",
    dataIndex: 'rate'
  },
  {
    title: '服务人员',
    align: "center",
    dataIndex: 'nursename'
  },
  {
    title: '服务人员手机',
    align: "center",
    dataIndex: 'nursephone'
  },
  {
    title: '服务人员身份证',
    align: "center",
    dataIndex: 'nurseidcard',
    width: 220
  },
  {
    title: '监护人ID',
    align: "center",
    dataIndex: 'userId',
    width: 220
  },
  {
    title: '监护人姓名',
    align: "center",
    dataIndex: 'userName'
  },
  {
    title: '监护人手机',
    align: "center",
    dataIndex: 'phone'
  },
  {
    title: '监护人身份证',
    align: "center",
    dataIndex: 'idcard',
    width: 230
  },
  {
    title: '被监护人ID',
    align: "center",
    dataIndex: 'familyId',
    width: 230
  },
  {
    title: '被监护人姓名',
    align: "center",
    dataIndex: 'familyName'
  },
  {
    title: '被监护人身份证',
    align: "center",
    dataIndex: 'familyidcard',
    width: 230
  },
  {
    title: '预收款时间',
    align: "center",
    dataIndex: 'checkoutTime'
  },
  {
    title: '支付方式',
    align: "center",
    dataIndex: 'payMethod'
  },
  {
    title: '预收款金额',
    align: "center",
    dataIndex: 'amt'
  },
  {
    title: '退款编号',
    align: "center",
    dataIndex: 'refundNumber'
  },
  {
    title: '退款时间',
    align: "center",
    dataIndex: 'refundTime'
  },
  {
    title: '应用ID',
    align: "center",
    dataIndex: 'appid',
    defaultHidden: true
  },
  {
    title: '直连商户号',
    align: "center",
    dataIndex: 'mchid'
  },
  {
    title: '商户订单号',
    align: "center",
    dataIndex: 'outTradeNo'
  },
  {
    title: '过期时间',
    align: "center",
    dataIndex: 'expiryTime',
    defaultHidden: true
  },
  {
    title: '取消时间',
    align: "center",
    dataIndex: 'cancelTime'
  },
  {
    title: '支付地址url',
    align: "center",
    dataIndex: 'payurl',
    defaultHidden: true
  },
  {
    title: '发票ID',
    align: "center",
    dataIndex: 'billId'
  },
  {
    title: '0微信',
    align: "center",
    dataIndex: 'paydev',
    defaultHidden: true
  },
  {
    title: '微信标识',
    align: "center",
    dataIndex: 'prepayid',
    defaultHidden: true
  },
  {
    title: '微信id',
    align: "center",
    dataIndex: 'openid',
    defaultHidden: true
  },
  {
    title: '订单类型 ',
    align: "center",
    dataIndex: 'nurseType',
    defaultHidden: true
  },
  {
    title: '订单摘要',
    align: "center",
    dataIndex: 'orderText',
    width: 400
  },
  {
    title: '规格',
    align: "center",
    dataIndex: 'standard',
    width: 400
  },
  {
    title: '联系人电话',
    align: "center",
    dataIndex: 'phone'
  },
  {
    title: '联系人',
    align: "center",
    dataIndex: 'contacts'
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'remark'
  },
  {
    title: '客服备注',
    align: "center",
    dataIndex: 'note'
  },
  {
    title: '省份/地级市/县市区',
    align: "center",
    dataIndex: 'area'
  },
  {
    title: '地区名称',
    align: "center",
    dataIndex: 'areaName'
  },
  {
    title: '详细地址',
    align: "center",
    dataIndex: 'address',
    width: 400
  },
  {
    title: '医联体',
    align: "center",
    dataIndex: 'hospital'
  },
  {
    title: '医院名称',
    align: "center",
    dataIndex: 'hospitalName',
    width: 300
  },
  {
    title: '科室',
    align: "center",
    dataIndex: 'dept'
  },
  {
    title: '科室名称',
    align: "center",
    dataIndex: 'deptName'
  },
  {
    title: '床号',
    align: "center",
    dataIndex: 'bed'
  },
  {
    title: '床号名称',
    align: "center",
    dataIndex: 'bedName',
    defaultHidden: true
  },
  {
    title: '创建人',
    align: "center",
    dataIndex: 'createBy'
  },
  {
    title: '创建时间',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '更新时间',
    align: "center",
    dataIndex: 'updateTime'
  },
  {
    title: '更新人',
    align: "center",
    dataIndex: 'updateBy'
  },
  {
    title: '开始日期',
    align: "center",
    dataIndex: 'beginDate'
  },
  {
    title: '结束日期',
    align: "center",
    dataIndex: 'endDate'
  },

];
//查询数据
export const searchFormSchema: FormSchema[] = [
  // {
  //   label: "订单号",
  //   field: "code",
  //   component: 'JInput',
  //   //colProps: {span: 6},
  // },
  {
    label: "订单状态",
    field: "status",
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "nurse_order_status"
    },
    //colProps: {span: 6},
  },
  {
    label: "分配状态",
    field: "dispense",
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "nurse_order_dispense"
    },
    //colProps: {span: 6},
  },
  {
    label: "是否拆分订单",
    field: "isapart",
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "yes_no"
    },
    //colProps: {span: 6},
  },
  {
    label: "价格参数",
    field: "rate",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "服务人员",
    field: "nursename",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "服务员手机",
    field: "nursephone",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "服务员身份证",
    field: "nurseidcard",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "监护人姓名",
    field: "userName",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "监护人手机",
    field: "phone",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "预收款时间",
    field: "checkoutTime",
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
    //colProps: {span: 6},
  },
  {
    label: "支付方式",
    field: "payMethod",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "退款编号",
    field: "refundNumber",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "退款时间",
    field: "refundTime",
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
    //colProps: {span: 6},
  },
  // {
  //   label: "商户订单号",
  //   field: "outTradeNo",
  //   component: 'Input',
  //   //colProps: {span: 6},
  // },
  {
    label: "取消时间",
    field: "cancelTime",
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
    //colProps: {span: 6},
  },
  {
    label: "发票ID",
    field: "billId",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "微信id",
    field: "openid",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "订单类型 ",
    field: "nurseType",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: "联系人电话",
    field: "phone",
    component: 'JInput',
    //colProps: {span: 6},
  },
  {
    label: '病历号',
    field: "record",
    component: 'JInput',
    //colProps: {span: 6},
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '订单号',
    field: 'code',
    component: 'Input',
    defaultValue: "",
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入订单号!' },
      ];
    },
  },
  {
    label: '订单状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "nurse_order_status"
    },
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入订单状态!' },
      ];
    },
  },
  {
    label: '分配状态',
    field: 'dispense',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "nurse_order_dispense"
    },
  },
  {
    label: '监护人ID',
    field: 'userId',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入监护人ID!' },
      ];
    },
  },
  {
    label: '监护人姓名',
    field: 'userName',
    component: 'Input',
  },
  {
    label: '监护人手机',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '监护人身份证',
    field: 'idcard',
    component: 'Input',
  },
  {
    label: '被监护人ID',
    field: 'familyId',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入被监护人ID!' },
      ];
    },
  },
  {
    label: '被监护人姓名',
    field: 'familyName',
    component: 'Input',
  },
  {
    label: '预收款时间',
    field: 'checkoutTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '支付方式',
    field: 'payMethod',
    component: 'InputNumber',
  },
  {
    label: '预收款金额',
    field: 'amt',
    component: 'InputNumber',
  },
  {
    label: '退款编号',
    field: 'refundNumber',
    component: 'Input',
  },
  {
    label: '退款时间',
    field: 'refundTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '应用ID',
    field: 'appid',
    component: 'Input',
  },
  {
    label: '直连商户号',
    field: 'mchid',
    component: 'Input',
  },
  {
    label: '商户订单号',
    field: 'outTradeNo',
    component: 'Input',
  },
  {
    label: '过期时间',
    field: 'expiryTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
    show: false
  },
  {
    label: '取消时间',
    field: 'cancelTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '支付地址url',
    field: 'payurl',
    component: 'Input',
  },
  {
    label: '发票ID',
    field: 'billId',
    component: 'Input',
  },
  {
    label: '0微信',
    field: 'paydev',
    component: 'InputNumber',
  },
  {
    label: '微信标识',
    field: 'prepayid',
    component: 'Input',
  },
  {
    label: '微信id',
    field: 'openid',
    component: 'Input',
  },
  {
    label: '订单类型 ',
    field: 'nurseType',
    component: 'Input',
  },
  {
    label: '订单摘要',
    field: 'orderText',
    component: 'Input',
  },
  {
    label: '联系人电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '联系人',
    field: 'contacts',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '省份/地级市/县市区',
    field: 'area',
    component: 'Input',
  },
  {
    label: '地区名称',
    field: 'areaName',
    component: 'Input',
  },
  {
    label: '详细地址',
    field: 'address',
    component: 'Input',
  },
  {
    label: '医联体',
    field: 'hospital',
    component: 'Input',
  },
  {
    label: '医院名称',
    field: 'hospitalName',
    component: 'Input',
  },
  {
    label: '科室',
    field: 'dept',
    component: 'Input',
  },
  {
    label: '科室名称',
    field: 'deptName',
    component: 'Input',
  },
  {
    label: '床号',
    field: 'bed',
    component: 'Input',
  },
  {
    label: '床号名称',
    field: 'bedName',
    component: 'Input',
  },
  {
    label: '创建人',
    field: 'createBy',
    component: 'Input',
  },
  {
    label: '创建时间',
    field: 'createTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '更新时间',
    field: 'updateTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '更新人',
    field: 'updateBy',
    component: 'Input',
  },
  {
    label: '开始日期',
    field: 'beginDate',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '结束日期',
    field: 'endDate',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '病历号',
    field: 'record',
    component: 'Input',
  },
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
];

//子表列表数据
export const nurseUserOrdersDetailColumns: BasicColumn[] = [
  {
    title: '订单ID',
    align: "center",
    dataIndex: 'orderId'
  },
  {
    title: '商品ID',
    align: "center",
    dataIndex: 'goodsId'
  },
  {
    title: '商品名称',
    align: "center",
    dataIndex: 'goodsName'
  },
  {
    title: '商品价格',
    align: "center",
    dataIndex: 'price'
  },
  {
    title: '数量',
    align: "center",
    dataIndex: 'num'
  },
  {
    title: '总金额',
    align: "center",
    dataIndex: 'amt'
  },
  {
    title: '费用类型',
    align: "center",
    dataIndex: 'costType'
  },
  {
    title: '费用类型名称',
    align: "center",
    dataIndex: 'costTypeName'
  },
  {
    title: '开票代码',
    align: "center",
    dataIndex: 'billCode'
  },
  {
    title: '开票名称',
    align: "center",
    dataIndex: 'billName'
  },
  {
    title: '单位',
    align: "center",
    dataIndex: 'unit'
  },
  {
    title: '规格',
    align: "center",
    dataIndex: 'specs'
  },
  {
    title: '创建人',
    align: "center",
    dataIndex: 'createBy'
  },
  {
    title: '创建时间',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '更新人',
    align: "center",
    dataIndex: 'updateBy'
  },
  {
    title: '更新时间',
    align: "center",
    dataIndex: 'updateTime'
  },
  {
    title: '商品上级ID',
    align: "center",
    dataIndex: 'pid'
  },
  {
    title: '商品上级名称',
    align: "center",
    dataIndex: 'pname'
  },
];
//子表表单数据
export const nurseUserOrdersDetailFormSchema: FormSchema[] = [
  // TODO 子表隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
  {
    label: '订单ID',
    field: 'orderId',
    component: 'Input',
  },
  {
    label: '商品ID',
    field: 'goodsId',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入商品ID!' },
      ];
    },
  },
  {
    label: '商品名称',
    field: 'goodsName',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入商品名称!' },
      ];
    },
  },
  {
    label: '商品价格',
    field: 'price',
    component: 'InputNumber',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入商品价格!' },
      ];
    },
  },
  {
    label: '数量',
    field: 'num',
    component: 'InputNumber',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入数量!' },
      ];
    },
  },
  {
    label: '总金额',
    field: 'amt',
    component: 'InputNumber',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入总金额!' },
      ];
    },
  },
  {
    label: '费用类型',
    field: 'costType',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入费用类型!' },
      ];
    },
  },
  {
    label: '费用类型名称',
    field: 'costTypeName',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入费用类型名称!' },
      ];
    },
  },
  {
    label: '开票代码',
    field: 'billCode',
    component: 'Input',
  },
  {
    label: '开票名称',
    field: 'billName',
    component: 'Input',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入单位!' },
      ];
    },
  },
  {
    label: '规格',
    field: 'specs',
    component: 'Input',
  },
  {
    label: '创建人',
    field: 'createBy',
    component: 'Input',
  },
  {
    label: '创建时间',
    field: 'createTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '更新人',
    field: 'updateBy',
    component: 'Input',
  },
  {
    label: '更新时间',
    field: 'updateTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  },
  {
    label: '商品上级ID',
    field: 'pid',
    component: 'Input',
  },
  {
    label: '商品上级名称',
    field: 'pname',
    component: 'Input',
  },
];
//子表列表数据
export const nurseUserOrdersCommentColumns: BasicColumn[] = [
  {
    title: '创建时间',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '更新时间',
    align: "center",
    dataIndex: 'updateTime'
  },
  {
    title: '创建人',
    align: "center",
    dataIndex: 'createBy'
  },
  {
    title: '更新人',
    align: "center",
    dataIndex: 'updateBy'
  },
  {
    title: '评论标题',
    align: "center",
    dataIndex: 'title'
  },
  {
    title: '评价',
    align: "center",
    dataIndex: 'evaluate'
  },
  {
    title: '评论详情',
    align: "center",
    dataIndex: 'description'
  },
  {
    title: '评分',
    align: "center",
    dataIndex: 'rate'
  },
  {
    title: '评论图片',
    align: "center",
    dataIndex: 'pic',
    customRender: render.renderImage,
  },
  {
    title: '用户ID',
    align: "center",
    dataIndex: 'userId'
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '回复',
    align: "center",
    dataIndex: 'reply'
  },
  {
    title: '产业名称',
    align: "center",
    dataIndex: 'nurseType_dictText'
  },
];
//子表表单数据
export const nurseUserOrdersCommentFormSchema: FormSchema[] = [
  // TODO 子表隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
  {
    label: '评论标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '评价',
    field: 'evaluate',
    component: 'Input',
  },
  {
    label: '评论详情',
    field: 'description',
    component: 'InputTextArea',
  },
  {
    label: '评分',
    field: 'rate',
    component: 'InputNumber',
  },
  {
    label: '评论图片',
    field: 'pic',
    component: 'JImageUpload',
    componentProps: {
      fileMax: 5
    },
  },
  {
    label: '状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "valid_status"
    },
  },
  {
    label: '用户ID',
    field: "center",
    component: 'Input'
  },
  {
    label: '回复',
    field: 'reply',
    component: 'InputTextArea',
  },
  {
    label: '产业名称',
    field: 'nurseType',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "nurse_type"
    },
  },
];
//子表列表数据
export const nurseUserOrdersPreColumns: BasicColumn[] = [
  {
    title: '订单ID',
    align: "center",
    dataIndex: 'orderId'
  },
  {
    title: '商品ID',
    align: "center",
    dataIndex: 'goodsId'
  },
  {
    title: '商品名称',
    align: "center",
    dataIndex: 'goodsName'
  },
  {
    title: '商品价格',
    align: "center",
    dataIndex: 'price'
  },
  {
    title: '数量',
    align: "center",
    dataIndex: 'num'
  },
  {
    title: '总金额',
    align: "center",
    dataIndex: 'amt'
  },
  {
    title: '费用类型',
    align: "center",
    dataIndex: 'costType'
  },
  {
    title: '费用类型名称',
    align: "center",
    dataIndex: 'costTypeName'
  },
  {
    title: '开票代码',
    align: "center",
    dataIndex: 'billCode'
  },
  {
    title: '开票名称',
    align: "center",
    dataIndex: 'billName'
  },
  {
    title: '单位',
    align: "center",
    dataIndex: 'unit'
  },
  {
    title: '规格',
    align: "center",
    dataIndex: 'specs'
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'status'
  },
];
//子表表单数据
export const nurseUserOrdersPreFormSchema: FormSchema[] = [
  // TODO 子表隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
  {
    label: '订单ID',
    field: 'orderId',
    component: 'Input',
  },
  {
    label: '商品ID',
    field: 'goodsId',
    component: 'Input',
  },
  {
    label: '商品名称',
    field: 'goodsName',
    component: 'Input',
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请输入商品名称!' },
      ];
    },
  },
  {
    label: '商品价格',
    field: 'price',
    component: 'InputNumber',
  },
  {
    label: '数量',
    field: 'num',
    component: 'InputNumber',
  },
  {
    label: '总金额',
    field: 'amt',
    component: 'InputNumber',
  },
  {
    label: '费用类型',
    field: 'costType',
    component: 'Input',
  },
  {
    label: '费用类型名称',
    field: 'costTypeName',
    component: 'Input',
  },
  {
    label: '开票代码',
    field: 'billCode',
    component: 'Input',
  },
  {
    label: '开票名称',
    field: 'billName',
    component: 'Input',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
  },
  {
    label: '规格',
    field: 'specs',
    component: 'Input',
  },
  {
    label: '状态',
    field: 'status',
    component: 'Input',
  },

];
//子表列表数据
export const nurseUserOrdersNursesNewColumns: BasicColumn[] = [
  {
   title: '订单ID',
   align:"center",
   dataIndex: 'orderId'
  },
  {
   title: '用户ID',
   align:"center",
   dataIndex: 'userId'
  },
  {
   title: '用户姓名',
   align:"center",
   dataIndex: 'userName'
  },
  {
   title: '服务人员ID',
   align:"center",
   dataIndex: 'nursesId'
  },
  {
   title: '服务人员姓名',
   align:"center",
   dataIndex: 'nursesName'
  },
  {
   title: '监护人ID',
   align:"center",
   dataIndex: 'familyId'
  },
  {
   title: '监护人姓名',
   align:"center",
   dataIndex: 'familyName'
  },
  {
   title: '创建人',
   align:"center",
   dataIndex: 'createBy'
  },
  {
   title: '创建日期',
   align:"center",
   dataIndex: 'createTime'
  },
  {
   title: '更新人',
   align:"center",
   dataIndex: 'updateBy'
  },
  {
   title: '更新日期',
   align:"center",
   dataIndex: 'updateTime'
  },
  {
   title: '状态',
   align:"center",
   dataIndex: 'status_dictText'
  },
  {
   title: '备注',
   align:"center",
   dataIndex: 'remark'
  },
  {
   title: '佣金',
   align:"center",
   dataIndex: 'amt'
  },
];
//子表表单数据
export const nurseUserOrdersNursesNewFormSchema: FormSchema[] = [
 // TODO 子表隐藏字段，目前写死为ID
 {
   label: '',
   field: 'id',
   component: 'Input',
   show: false
 },
 {
   label: '订单ID',
   field: 'orderId',
   component: 'Input',
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入订单ID!'},
         ];
    },
    dynamicDisabled:true,
 },
 {
   label: '用户ID',
   field: 'userId',
   component: 'Input',
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入用户ID!'},
         ];
    },
    dynamicDisabled:true,
 },
 {
   label: '用户姓名',
   field: 'userName',
   component: 'Input',
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入用户姓名!'},
         ];
    },
    dynamicDisabled:true,
 },
 {
   label: '服务人员ID',
   field: 'nursesId',
   component: 'Input',
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入服务人员ID!'},
         ];
    },
 },
 {
   label: '服务人员姓名',
   field: 'nursesName',
   component: 'Input',
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入服务人员姓名!'},
         ];
    },
 },
 {
   label: '监护人ID',
   field: 'familyId',
   component: 'Input',
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入监护人ID!'},
         ];
    },
    dynamicDisabled:true,
 },
 {
   label: '监护人姓名',
   field: 'familyName',
   component: 'Input',
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入监护人姓名!'},
         ];
    },
    dynamicDisabled:true,
 },
 {
   label: '创建人',
   field: 'createBy',
   component: 'Input',
  //  dynamicRules: ({model,schema}) => {
  //        return [
  //               { required: true, message: '请输入创建人!'},
  //        ];
  //   },
    show:false,
 },
 {
   label: '创建日期',
   field: 'createTime',
   component: 'DatePicker',
   componentProps: {
      showTime:true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
  //  dynamicRules: ({model,schema}) => {
  //        return [
  //               { required: true, message: '请输入创建日期!'},
  //        ];
  //   },
    show:false,
 },
 {
   label: '更新人',
   field: 'updateBy',
   component: 'Input',
   show:false,
 },
 {
   label: '更新日期',
   field: 'updateTime',
   component: 'DatePicker',
   componentProps: {
      showTime:true,
      valueFormat: 'YYYY-MM-DD HH:mm:ss'
    },
    show:false,
 },
 {
   label: '状态',
   field: 'status',
   component: 'JDictSelectTag',
   componentProps:{
       dictCode:"nurse_orders_nurses_status"
    },
   dynamicRules: ({model,schema}) => {
         return [
                { required: true, message: '请输入状态!'},
         ];
    },
    show:false,
 },
 {
   label: '备注',
   field: 'remark',
   component: 'Input',
 },
 {
   label: '佣金',
   field: 'amt',
   component: 'InputNumber',
 },
];

// 客服审核专用表单配置（只显示订单号到被监护人姓名）
export const customerServiceReviewFormSchema: FormSchema[] = [
  {
    label: '订单号',
    field: 'code',
    component: 'Input',
    componentProps: {
      disabled: true
    }
  },
  {
    label: '订单状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "nurse_order_status"
    },
    dynamicRules: ({ model, schema }) => {
      return [
        { required: true, message: '请选择订单状态!' },
      ];
    },
  },
  {
    label: '分配状态',
    field: 'dispense',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: "nurse_order_dispense"
    },
  },
  {
    label: '监护人ID',
    field: 'userId',
    component: 'Input',
    componentProps: {
      disabled: true
    }
  },
  {
    label: '监护人姓名',
    field: 'userName',
    component: 'Input',
    componentProps: {
      disabled: true
    }
  },
  {
    label: '监护人手机',
    field: 'phone',
    component: 'Input',
    componentProps: {
      disabled: true
    }
  },
  {
    label: '监护人身份证',
    field: 'idcard',
    component: 'Input',
    componentProps: {
      disabled: true
    }
  },
  {
    label: '被监护人ID',
    field: 'familyId',
    component: 'Input',
    componentProps: {
      disabled: true
    }
  },
  {
    label: '被监护人姓名',
    field: 'familyName',
    component: 'Input',
    componentProps: {
      disabled: true
    }
  },
  {
    label: '客服备注',
    field: 'note',
    component: 'InputTextArea',
    componentProps: {
      rows: 2,
      placeholder: '请输入客服备注'
    }
  },
  // 主键隐藏字段
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
];

// 高级查询数据
export const superQuerySchema = {
  code: { title: '订单号', order: 0, view: 'text', type: 'string', },
  status: { title: '订单状态', order: 1, view: 'radio', type: 'string', },
  dispense: { title: '分配状态', order: 2, view: 'radio', type: 'string', },
  isapart: { title: '是否拆分订单', order: 3, view: 'radio', type: 'string', },
  rate: { title: '价格参数', order: 4, view: 'text', type: 'string', },
  nursename: { title: '服务人员', order: 5, view: 'text', type: 'string', },
  nursephone: { title: '服务人员手机', order: 6, view: 'text', type: 'string', },
  nurseidcard: { title: '服务人员身份证', order: 7, view: 'text', type: 'string', },
  userId: { title: '监护人ID', order: 8, view: 'text', type: 'string', },
  userName: { title: '监护人姓名', order: 9, view: 'text', type: 'string', },
  familyId: { title: '被监护人ID', order: 10, view: 'text', type: 'string', },
  familyName: { title: '被监护人姓名', order: 11, view: 'text', type: 'string', },
  checkoutTime: { title: '预收款时间', order: 12, view: 'datetime', type: 'string', },
  payMethod: { title: '支付方式', order: 13, view: 'number', type: 'number', },
  amt: { title: '预收款金额', order: 9, view: 'number', type: 'number', },
  refundNumber: { title: '退款编号', order: 10, view: 'text', type: 'string', },
  refundTime: { title: '退款时间', order: 11, view: 'datetime', type: 'string', },
  appid: { title: '应用ID', order: 12, view: 'text', type: 'string', },
  mchid: { title: '直连商户号', order: 13, view: 'text', type: 'string', },
  outTradeNo: { title: '商户订单号', order: 14, view: 'text', type: 'string', },
  expiryTime: { title: '过期时间', order: 15, view: 'datetime', type: 'string', },
  cancelTime: { title: '取消时间', order: 16, view: 'datetime', type: 'string', },
  payurl: { title: '支付地址url', order: 17, view: 'text', type: 'string', },
  billId: { title: '发票ID', order: 18, view: 'text', type: 'string', },
  paydev: { title: '0微信', order: 19, view: 'number', type: 'number', },
  prepayid: { title: '微信标识', order: 20, view: 'text', type: 'string', },
  openid: { title: '微信id', order: 21, view: 'text', type: 'string', },
  nurseType: { title: '订单类型 ', order: 22, view: 'text', type: 'string', },
  orderText: { title: '订单摘要', order: 23, view: 'text', type: 'string', },
  phone: { title: '联系人电话', order: 24, view: 'text', type: 'string', },
  contacts: { title: '联系人', order: 25, view: 'text', type: 'string', },
  remark: { title: '备注', order: 26, view: 'text', type: 'string', },
  area: { title: '省份/地级市/县市区', order: 27, view: 'text', type: 'string', },
  areaName: { title: '地区名称', order: 28, view: 'text', type: 'string', },
  address: { title: '详细地址', order: 29, view: 'text', type: 'string', },
  hospital: { title: '医联体', order: 30, view: 'text', type: 'string', },
  hospitalName: { title: '医院名称', order: 31, view: 'text', type: 'string', },
  dept: { title: '科室', order: 32, view: 'text', type: 'string', },
  deptName: { title: '科室名称', order: 33, view: 'text', type: 'string', },
  bed: { title: '床号', order: 34, view: 'text', type: 'string', },
  bedName: { title: '床号名称', order: 35, view: 'text', type: 'string', },
  createBy: { title: '创建人', order: 36, view: 'text', type: 'string', },
  createTime: { title: '创建时间', order: 37, view: 'datetime', type: 'string', },
  updateTime: { title: '更新时间', order: 38, view: 'datetime', type: 'string', },
  updateBy: { title: '更新人', order: 39, view: 'text', type: 'string', },
  beginDate: { title: '开始日期', order: 40, view: 'datetime', type: 'string', },
  endDate: { title: '结束日期', order: 41, view: 'datetime', type: 'string', },
  record: { title: '病历号', order: 42, view: 'text', type: 'string', },
};
